package com.wg.wuge.service.impl;

import com.wg.wuge.dto.*;
import com.wg.wuge.mapper.SongMapper;
import com.wg.wuge.service.SongService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;

@Service
public class SongServiceImpl implements SongService {

    @Resource
    SongMapper songMapper;

    @Override
    public List<RecommendSongList> personalized(Integer limit) {
        RecommendSongList detail = new RecommendSongList();
        detail.setId(1);
        detail.setName("五哥歌单");
        detail.setCopywriter("测试看看");
        detail.setPicUrl("http://e.hiphotos.baidu.com/image/pic/item/a1ec08fa513d2697e542494057fbb2fb4316d81e.jpg");
        return Arrays.asList(detail);
    }

    @Override
    public PlayListDto playListDetail(Integer id) {
        PlayListDto result = new PlayListDto();
        PlayListDetailDto detailDto = new PlayListDetailDto();
        detailDto.setName("测试下");
        detailDto.setCoverImgUrl("http://e.hiphotos.baidu.com/image/pic/item/a1ec08fa513d2697e542494057fbb2fb4316d81e.jpg");
        detailDto.setTags(Arrays.asList("测试"));
        detailDto.setCommentCount(0);
        detailDto.setDescription("测试描述");
        detailDto.setUpdateTime("2024-11-11");
        IdsDto idsDto = new IdsDto();
        idsDto.setId(10);
        detailDto.setTrackIds(Arrays.asList(idsDto));
        CreatorDto creatorDto = new CreatorDto();
        creatorDto.setNickname("五哥测试");
        creatorDto.setAvatarUrl("http://e.hiphotos.baidu.com/image/pic/item/a1ec08fa513d2697e542494057fbb2fb4316d81e.jpg");
        detailDto.setCreator(creatorDto);
        result.setPlaylist(detailDto);
        return result;
    }

    @Override
    public SongDetailDto songDetail(Integer ids) {
        SongDetailDto result = new SongDetailDto();
        SongDetailSubDto songDto = new SongDetailSubDto();
        songDto.setDt(60000);
        result.setSongs(Arrays.asList(songDto));
        SongUrlAlDto al = new SongUrlAlDto();
        al.setId(2);
        al.setName("1231");
        al.setPicUrl("http://e.hiphotos.baidu.com/image/pic/item/a1ec08fa513d2697e542494057fbb2fb4316d81e.jpg");
        songDto.setAl(al);
        return result;
    }
}
